annex.diskreserve default increased from 1 mb to 100 mb
authorJoey Hess <joeyh@joeyh.name>
Wed, 21 Sep 2022 19:00:13 +0000 (15:00 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 21 Sep 2022 19:00:13 +0000 (15:00 -0400)
It's hard to know what's a good default for this. But 1 mb seems way too
small, because it's very easy for a git pull or some similar operation
that we don't think of as using much space to use up 1 mb of space.

Most people would want to free up some space if a filesystem only had 100
mb free. But on a small VPS, it's probably not uncommon to have only 1 gb
free. So 1 gb is too large for annex.diskreserve.

While old 1 gb USB keys are around, it's unlikely that anyone is
relying on them to shuttle annex data around; it would be worth anyone's
time to upgrade to a 32 gb or larger cheap modern USB key ($5).

Sponsored-by: Kevin Mueller on Patreon
CHANGELOG
Types/GitConfig.hs
doc/git-annex.mdwn
doc/todo/prevent_pulling_unlocked_files_using_all_disk_space_by_default.mdwn

index 6a7342c63998b1ec1e5c22ba4f97490bc2e8bf41..0623c8b6e7d31f1b490cea2ab450d85e4f6e87a5 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,6 @@
 git-annex (10.20220823) UNRELEASED; urgency=medium
 
+  * annex.diskreserve default increased from 1 mb to 100 mb.
   * Include the assistant and webapp when building with cabal 3.4.1.0.
   * Merged the webapp build flag into the assistant build flag.
   * Optimise linker in linux standalone tarballs.
index 22a299c4800fc41c21e62abd4b4c8701de94307e..44629d4126d79d0913527d0491822853b87a464d 100644 (file)
@@ -153,7 +153,7 @@ extractGitConfig configsource r = GitConfig
        , annexUUID = hereuuid
        , annexNumCopies = configuredNumCopies
                <$> getmayberead (annexConfig "numcopies")
-       , annexDiskReserve = fromMaybe onemegabyte $
+       , annexDiskReserve = fromMaybe (onemegabyte * 100) $
                readSize dataUnits =<< getmaybe (annexConfig "diskreserve")
        , annexDirect = getbool (annexConfig "direct") False
        , annexBackend = maybe
index b6dd7300845318e4eb102ac00726a30458c3d192..d95ec25f6bffcaf56b7ee2ce49b81d7b49ac2f65 100644 (file)
@@ -822,12 +822,12 @@ repository, using [[git-annex-config]]. See its man page for a list.)
 * `annex.diskreserve`
 
   Amount of disk space to reserve. Disk space is checked when transferring
-  content to avoid running out, and additional free space can be reserved
-  via this option, to make space for more important content (such as git
-  commit logs). Can be specified with any commonly used units, for example,
-  "0.5 gb", "500M", or "100 KiloBytes"
+  annexed content to avoid running out, and additional free space can be
+  reserved via this option, to make space for other data (such as git 
+  commit logs). Can be specified with any commonly used units, for 
+  example, "0.5 gb", "500M", or "100 KiloBytes"
 
-  The default reserve is 1 megabyte.
+  The default reserve is 100 megabytes.
 
 * `annex.skipunknown`
 
index f920a448262a04092490e238bca4d52a9e91f636..75c6ad6153c3b7fed965c30dc9078ccfe90ecea2 100644 (file)
@@ -9,6 +9,7 @@ be eaten up by other non-object uses of disk.
 
 Perhaps 1 mb is too small for the default for annex.diskreserve. Even
 10 or 100 mb would leave a lot more margin for other minor uses of disk space.
+(Update: increased default to 100 mb)
 
 Perhaps there could be another config like annex.diskreserve but that
 applies only to populating unlocked files. It could default to some larger